use lib qw(D:\Data\Perl\devel\TemplateEnginePrptotype\lib);

use strict;
use warnings;

use Template5::DTD;
use Template5::Element;
use Template5::TreeBuilder;
use Template5::Creater;
use Template5::XPath;
use Template5::PHPGenerator;
use Template5::Render;
use Template5::CondCheck;

#------------------------------------------------------------------------------- 
my $treeBuilder = Template5::TreeBuilder->new();
my $hHTMLNode = $treeBuilder->parse_file(qw(D:\Data\Perl\devel\TemplateEnginePrptotype\data\test_Link.html));

my $dtd     = Template5::DTD->new();
my $factory = Template5::Element->new();

my $creater = Template5::Creater->new($dtd, $factory);
my $elm = $creater->create_element($hHTMLNode, {'iseditable' => 1, 'templatesdir' => qw(D:\Data\Perl\devel\TemplateEnginePrptotype\data)});


my @childsStructs = $elm->listChild();

#print scalar(@childsStructs);
my $link = $childsStructs[1]->{'tml'};
my @linkChilds = $link->listChild();

print $linkChilds[0]->{'parent'};
#print scalar(@linkChilds);


#my $php = Template5::PHPGenerator->new();
#print $php->generate();

#my $render = Template5::Render->new($elm);
#print $render->render({'window' => 'qw'}); 
